home *** CD-ROM | disk | FTP | other *** search
- Path: news.primenet.com!not-for-mail
- From: gbe@primenet.com (Gary Edstrom)
- Newsgroups: comp.lang.c++
- Subject: Re: Programming problem with Borland C++ 3.1
- Date: 21 Feb 1996 22:49:04 -0700
- Organization: Sequoia Software
- Sender: root@primenet.com
- Message-ID: <312c0411.5136479@news.primenet.com>
- References: <312B40D9.3E66@scolaire.ucd.ie>
- X-Posted-By: ip233.lax.primenet.com
- X-Newsreader: Forte Agent .99d/32.182
-
- The "operator =" function is a special function in C++. It needs to be
- overridden in any derived class or else a simple member to member copy will be
- performed when assigning members of a derived class. "Operator =" is NOT
- inherited into derived classes.
-
- I hope this helps.
-
- Gary Edstrom <gbe@primenet.com>
-
- On Wed, 21 Feb 1996 15:57:13 +0000, you wrote:
-
- >I'm doing a program about speech Recognition and I've run into a problem
- >that I'm not able to solve, because I simply don't understand it.
- >I wrote this code:
-
- [snip]
-
- >these two functions should do exactly the same job, as far as I know,
- >but they don't. why?
- >If I try and use the operator= (between two elements of the derived
- >class vectorArr) the program fails, and, by debugging, I discovered that
- >the compiler generates different codes not for the functions, but at the
- >point where the functions are called (they are not inlined).
- >Can any guru or half-guru help me?
-
- --
- Gary Edstrom <gbe@primenet.com> | Sequoia Software
- PO Box 9573 | Programming & Technical Services
- Glendale CA 91226-0573 | PGP Key ID: 0x1A0D44BD
- PGP Fingerprint: 72 AA 4F 73 05 53 89 C6 8A EE F4 EE D1 C0 13 8D
-